package com.yunnuo.systool.formbuilder.service.impl;

import com.yunnuo.systool.formbuilder.dao.IFormBuilderDao;
import com.yunnuo.systool.formbuilder.entity.FormBuilder;
import com.yunnuo.systool.formbuilder.service.IFormBuilderService;
import org.hibernate.service.spi.ServiceException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by w_weihf on 2018/12/3.
 */
@Service
public class FormBuilderServiceImpl implements IFormBuilderService {

    @Autowired
    private IFormBuilderDao formBuilderDao;


    @Override
    public void addVO(FormBuilder vo) throws ServiceException {
        this.formBuilderDao.save(vo);
    }

    @Override
    public void updateVO(FormBuilder vo) throws ServiceException {
        this.formBuilderDao.save(vo);
    }

    @Override
    public void delList(String[] ids) throws ServiceException {

    }

    @Override
    public void deleteVo(String id) throws ServiceException {
      this.formBuilderDao.delete(id);
    }

    @Override
    public List<FormBuilder> findList() throws ServiceException {
        return formBuilderDao.findAll();
    }

    @Override
    public List<?> findList(FormBuilder vo, String other) throws ServiceException {
        return null;
    }

    @Override
    public FormBuilder findVO(String id) throws ServiceException {
        return formBuilderDao.findOne(id);
    }
}
